Skip to main content
This forum is closed to new posts and responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Naomi Elnupuljip 7.Oct.03 05:42 PM a Web browser
Applications Development 6.0.3; 6.0.2 CF2; 6.0.2 CF1; 6.0.2; 6.0.1 CF3; 6.0.1 CF2; 6.0.1 CF1; 6.0.1; 6.0 Windows XP


I want to do some additional tasks which I want to do in LotusScript.
Here is my current script:

Sub Click(Source As Button)
Dim ss As New NotesSession
Dim ws As New NotesUIWorkspace
Dim UIView As NotesUIView
Dim db As NotesDatabase
Dim View As NotesView
Dim dc As NotesDocumentCollection
Dim dc2 As NotesDocumentCollection
Dim Doc As NotesDocument
Dim DelDoc As NotesDocument
Dim Agent As NotesAgent

Set db = ss.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set Doc = dc.GetFirstDocument
Set View = db.GetView("DeletedChildDocs")

Do While Not Doc Is Nothing

If Doc.TaskSubform(0) = "1" Then

Set dc2 = View.GetAllDocumentsByKey(Doc.UniversalID)
Call dc2.StampAll("Deleted", "")

End If
Set DelDoc = Doc
Set Doc = dc.GetNextDocument(Doc)

Loop

Set UIView = ws.CurrentView
Set Doc = dc.GetFirstDocument

Do While Not Doc Is Nothing

Call UIView.SelectDocument(Doc)
Set Doc = dc.GetNextDocument(Doc)

Loop
' Evaluate {@Command([EditRestoreDocument]);}
' Evaluate {@Command([ToolsRunMacro]; "RestoreDocuments")}
Set Agent = db.GetAgent("RestoreDocuments")
Call Agent.Run
End Sub

The RestoreDocuments agent contains a
@Command([EditRestoreDocument]);
and works well by itself.
To rephrase the question: how do you make LS to run this agent? It does not even start, but fails silently...

I put the second Do/Loop in as part of the struggle but did not help.
Can you?
Thanks!






How to restore a softdeleted docume... (~Naomi Elnupulj... 7.Oct.03)
. . RE: How to restore a softdeleted do... (~Patti Chufooli... 7.Oct.03)
. . . . Did you have to do a Save? eom> (~Dan Elhipister... 8.Oct.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS